package com.atom.process.cnmuseum.cj.dao.task;


import com.atom.common.dao.AvensCommonDao;
import com.atom.process.cnmuseum.cj.entity.task.CjDbrwTaskDO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class CjDbrwTaskDao extends AvensCommonDao<CjDbrwTaskDO> {

    public List<CjDbrwTaskDO> findByTaskId(String taskId) {
        List<CjDbrwTaskDO> list = super.findByProperty("taskId", taskId);
        return list;
    }

//    public CjDbrwTaskDO findLastByProcessId(String taskId) {
//        List<CjDbrwTaskDO> list = super.findByPropertyOrderBy("processId", taskId, "id");
//        if (list == null || list.size() == 0) {
//            throw new AvensNullPointerException("TaskDO is null where taskId = " + taskId);
//        } else {
//            return list.get(list.size() - 1);
//        }
//    }
//
//
//    public void createADO(UserUtil user, String processInstanceId, String taskId, String gcxxid) {
//        CjDbrwTaskDO ado = new CjDbrwTaskDO();
//        ado.setProcessId(processInstanceId);
//        ado.setTaskId(taskId);
//        ado.setGcxxId(gcxxid);
//        save(ado);
//    }

}
